/**
 * Team members:
 * HengXing Liu 2022229044
 * YiYang Zhang 2022229047
 * ZeJun Liu 2022229092
 */
package project;

/**
 * A class to handle syntax exception.
 * A syntax exception is thrown when
 * the structure of expression is wrong
 * in the user input (like "1*^2" or use "last" after reset "last" )
 */
public class SyntaxErrorException extends Exception{
    private String message;
    public SyntaxErrorException(){
        message = "Syntax error: malformed expression";
    }
    public SyntaxErrorException(String msg){
        message = "Syntax error: " + msg;
    }
    @Override
    public String getMessage() {
        return message;
    }
}
